const db = require('../config/db')
const {DataTypes} = require('sequelize');


const attributes = {
    id: {
        type: DataTypes.INTEGER,
        primaryKey: true,            // 主键
        autoIncrement: true,// 自动递增
        comment: '评论id',
    },

    page_view: {
        type: DataTypes.INTEGER,
        comment: '当天页面浏览量',
    },
    comment_count: {
        type: DataTypes.INTEGER,
        comment: '当天网站评论数',
    },
    create_date:{
        type: DataTypes.DATE,
        comment: '日期',
    }
}


const StatisticalTableModel = db.define('statistical_table', attributes)

StatisticalTableModel.sync()


module.exports = StatisticalTableModel
